home *** CD-ROM | disk | FTP | other *** search
/ By Popular Request 2.0 / By Popular Request 2.0 (Arsenal Computer).ISO / amiga_2 / cnetjam2.lha / CNetJam2 / cnet / pfiles / fido / NetLogViewer < prev    next >
Text File  |  1995-01-27  |  2KB  |  43 lines

  1. /**************************************************************************\
  2.             $VER: NET_Log Viewer, v2.0 (27-Jan-95) by Dotoran!
  3. \**************************************************************************/
  4. options results;signal on SYNTAX;signal on ERROR;signal on IOERR
  5. tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch
  6.  
  7. /* Gives the SysOp a way to view logs pertaining to Networks, JamMail, etc.
  8.    You should add this line to the bottom of Menu # 1; SysOp Only Menu of
  9.    your "cnet:bbsmenu" file:
  10.  
  11.         NL, Net Log | {#0pfiles:fido/NetLogViewer}
  12.                       ^
  13.                   Control-Q
  14. */
  15.  
  16. START:
  17.     logs  = 6                /* Total Number of Logs to Define */
  18.     path  = "SysData:Log/"   /* Path where logs are stored */
  19.     log.1 = "NetMail"        /* These are the FILENAMES the logs use */
  20.     log.2 = "JamMail"
  21.     log.3 = "TrapList"
  22.     log.4 = "Toss"
  23.     log.5 = "Poll"
  24.     log.6 = "FFRS"
  25.  
  26.     do i=1 to logs;f.i=exists(path||log.i);end i
  27.     tr 'n1r1 CNet Amiga FIDO-NET Log Viewer r0n1   * = Log Existsn1'
  28.     do i=1 to logs;tr right(i,2)'. 'substr(' *',f.i+1,1)' 'log.i;end i
  29.     se 'n1Q. Quit Log Viewern2Choice: i0 2}';gu 70;a=result
  30.     if a<1|a>logs then a='q';if a='q' then do;tr 'Quit';exit;end
  31.     if f.a=1 then tr substr(log.a,13)'n1q1*0'path||log.a'}'
  32.         else do;tr substr(log.a,13)'n2<Log Empty>';signal START;end
  33.     se 'Delete Log? [No]: ';gc;b=result
  34.     if b~='Y' then do;tr 'No.';signal START;end
  35.     tr 'Yes!n2Deleting...$odelete 'path||log.a'}h6ed!'
  36.   signal START
  37.  
  38. SYNTAX:;ERROR:;IOERR:;e1=' c9Errorcf: ca'rc' cf(ca'errortext(rc)'cf)';e2='  c9Linecf: ce'left(sigl,4)'c9Filecf:'
  39.   gu 1311992;a=result;gu 1311960;b=result;c='cb"ce'a||b'cb"';e2=e2' 'c;tr e1;tr e2;logentry e1;logentry e2;e=sourceline(sigl)
  40.   do while e~='';e3='c9Sourcecf: cd'left(e,37);tr e3;logentry e3;e=substr(e,38);end;bufferflush;exit
  41. /** Last Edited: 27-Jan-95 ************************************************\
  42. \****************************************** FRONTIERS BBS (716)/823-9892 **/
  43.